package com.ztjava.member.service;

import com.jfinal.plugin.activerecord.Db;
import com.ztjava.core.base.BaseService;
import com.ztjava.member.model.MemberGroup;
import com.ztjava.member.model.MemberUser;

public class MemberService extends BaseService {
	public void updateMemberGroupAmount(Integer id){
		if(id==null||id==0) return;
		Db.update("update "+MemberGroup.tablename+" set amount=? where id=?",
				Db.queryLong("select count(id) from "+MemberUser.tablename+" where group_id=?",id),
				id);
	}
}
